package org.tzw.basetemplate;

import static android.Manifest.permission.*;

import androidx.appcompat.app.AppCompatActivity;

import android.Manifest;
import android.os.Bundle;
import android.view.View;

import com.tbruyelle.rxpermissions2.RxPermissions;

import org.tzw.basetemplate.databinding.ActivityMainBinding;
import org.tzw.template.base.BaseActivity;
import org.tzw.template.framework.anno.AllPermission;
import org.tzw.template.framework.anno.Permissions;

import io.reactivex.functions.Consumer;

//@AllPermission
public class MainActivity extends BaseActivity<ActivityMainBinding> {

    @Override
    protected void initView() {

    }

    @Override
    protected void initListener() {
        mRoot.txtDemo.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                redirectToActivity(MainActivity2.class);
//                new RxPermissions(MainActivity.this).request(REQUEST_INSTALL_PACKAGES).subscribe(new Consumer<Boolean>() {
//                    @Override
//                    public void accept(Boolean check) throws Exception {
//                        if(check){
//
//                        }else{
//                            showToastShort("权限被拒绝,请自行到系统设置中开启相关权限");
//                        }
//                    }
//                });
            }
        });
    }
}